package fr.starn.meteo_widgets;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class ShowPopUpActivity extends Activity  implements OnClickListener{





//    LinearLayout layout;
    TextView tv;
//    LayoutParams params;
    LinearLayout mainLayout;
    Button but;
    boolean click = true;


    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        layout = new LinearLayout(this);
        mainLayout = new LinearLayout(this);
        
        tv = new TextView(this);
        String msgError = getIntent().getStringExtra("error");
        tv.setText(msgError);
          
        
        but = new Button(this);
        but.setText("Ok");
        but.setOnClickListener(this);
        
//        params = new LayoutParams(LayoutParams.WRAP_CONTENT,
//                LayoutParams.WRAP_CONTENT);
        mainLayout.setOrientation(LinearLayout.VERTICAL);
        

        //popUp.showAtLocation(layout, Gravity.BOTTOM, 10, 10);
        mainLayout.addView(tv);      
        mainLayout.addView(but);
        setContentView(mainLayout);
    }


	@Override
	public void onClick(View view) {
		this.finish();
	}


}
